package messagesPacks;

import java.util.Hashtable;
import Entity.Book;

public class BookMSG extends GenericMessage
{
	private static final long serialVersionUID = 1L;
	private Hashtable<Integer, Book> books;
	public enum op_type
	{
		ALL_bookinfo,		// used for passing all information about a book(s)
		ALL_copies          //// used for passing all information about a book(s)
	};
	op_type op;
	
	public BookMSG(op_type op)
	{
		this.type = msgType.BookMSG;
		books = new Hashtable<Integer,Book>();
		this.op = op;
	}

	public Book getBook(int code) 
	{
		return books.get(code);
	}

	public void addBook(int key,Book book) 
	{
		books.put(key, book);
	}
}